<?php 
	$product_details = $this->product_details ;
	$list_images = $this->list_image ;
?>
<h2 class="arrow_left_bg">CONFIRMATION DETAILS</h2>
<div class="wrd_message_confirm" >
	<div style="padding-left: 20px; padding-right: 20px; padding-top: 10px;">
		<table>
			<tr>
				<td>
					<span class='link_color'>CONGRATULATION ! </span>Your Redemption has been confirmed .
				</td>
			</tr>
			<tr>
				<td>
					<p><b>YOUR CONFIRMATION NUMBER</b> is : <span class='link_color'><?php echo $this->confirm_number ; ?></span></p>
					<p>Please print this page for your record.</p>
					<p>You will receive an email receipt for this redemption .</p>
				</td>
			</tr>
			<tr>
				<td>
					<p><b>EXCHANGE SUMMARY</b> : </p>
					<p class='padding-left30'>Previous Balance : <span class='link_color'><?php echo $p_point = intval($product_details->point) + intval($this->p_o_u ) ; ?> points</span></p>
					<p class='padding-left30'>Points Redeemed : <span class='link_color'><?php echo $product_details->point ; ?> points</span></p>
					<p class='padding-left30'>Current Balance : <span class='link_color'><?php echo $this->p_o_u ; ?> points</span></p>
					<p class='padding-left30'>Receving at Outlet : <span class='link_color'><?php echo $this->outlet_name ; ?></span></p>
				</td>
			</tr>
			<tr>
				<td>
					<?php 
						if( !empty($product_details) && count($product_details) > 0) : 
					?>
						<table style="width:100% ;">
							<tr>
								<td>
									<div>
										<?php if(count($list_images)>0):?>
										<div class="f-left figure_images" style="margin-bottom:10px;margin-right:10px;">
											<table cellpadding="2">
												<tr>
													<td>
														<center>
															<div id="main_figure_img">
																<img border="0" src="wrd/image/<?php echo $list_images[0]->file_name; ?>" width = "220" height = "120"  />
															</div>
														</center>
													</td>
												</tr>
												<tr>
													<td>
														<script type="text/javascript">
															function changeFigureImg(val){
																document.getElementById('main_figure_img').innerHTML = "<img src=wrd/image/"+val+" width=220 height=120 />";
															}
														</script>
														
														<?php 
															$i = 0;
															foreach($list_images as $list_image):
														?>
																<a href="#image<?php echo $i ; ?>" onclick = "changeFigureImg('<?php echo $list_image->file_name ; ?>')" ><img border="0" class="f-left" src=wrd/thumb/<?php echo $list_image->file_name ; ?> width="70" height="40" /></a>
														<?php 
																$i++;	
															endforeach;
														?>
													</td>
												</tr>	
											</table>
										</div>
										<?php endif ; ?>
										<div>
											<table cellpadding="0" cellspacing="0">
												<tr>
													<td>
														<table cellpadding="0" cellspacing="0">
															<tr>
																<td>
																	<b class="f-left"><?php echo $product_details->products_name; ?></b>
																</td>
																<td class="p-l-10">
																	<span class="link_color f-left"> - <?php echo $product_details->point ; ?> Points</span>
																</td>
															</tr>
														</table>
													</td>
												</tr>
											</table>
											<div class="a-justify">
												<?php 
													if(!empty($product_details->des)){
														echo $product_details->des;
													}
												?>
											</div>
										</div>
										<br clear="both" />
									</div>
								</td>
							</tr>
						</table>
					<?php endif ; ?>
				</td>
			</tr>
		</table>
	</div>
</div> 
